require('../css/commCss/normalize.css')
require('../css/commCss/reset.css')
require('../css/commCss/property.css')
require('../lib/flexible')
require('../font/iconfont.css')
require('../css/commCss/footer.less')
require('../css/commCss/running.less')
    //导入util
const util = require('../util/util')
    //引入axios
const axios = require('axios')

document.addEventListener('DOMContentLoaded', function() {

    /* 获取元素 */
    let runkm = document.querySelector('.km>b')
        // console.log(runkm);

    let map = new AMap.Map('map', {
        zoom: 15, //地图缩放比例-级别
        center: [103.983131, 30.464632], //中心点坐标
    });
    util.fixBottomNav('running')

    axios.get('http://139.9.177.51:8099/sports/exerciseData', {
        params: {
            id: localStorage.getItem('userId')
        }
    }).then(function(res) {
        if (res.data.status === 0) {
            runkm.textContent = res.data.data.runkm
        }
    })
})